package Swing;
import javax.swing.*;
public class buttonExam {
	static final int WIDTH=300;
	static final int HEIGHT=200;
	public static void main(String[] args) {
		JFrame jf = new JFrame("button exam");
		jf.setSize(WIDTH,HEIGHT);
		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jf.setVisible(true);
		JPanel contentPane = new JPanel();
		jf.setContentPane(contentPane);
		JButton button1 = new JButton("Yes");
		JButton button2 = new JButton("Cancel");
		contentPane.add(button1);
		contentPane.add(button2);
	}
}